package com.landscope.issue.controller.wx;

import com.landscope.issue.controller.base.ResponseResult;
import com.landscope.issue.controller.wx.dto.AppletMainMessageDto;
import com.landscope.issue.controller.wx.dto.AppletStationListDto;
import com.landscope.issue.controller.wx.dto.AppletStationViewDto;
import com.landscope.issue.controller.wx.param.AppletMainGetNoticeParam;
import com.landscope.issue.controller.wx.param.AppletStationListParam;
import com.landscope.issue.controller.wx.param.AppletStationViewParam;
import com.landscope.issue.service.applet.ApiAppletStationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RequestMapping("api/applet/station")
@RestController
@Api(tags = "7.小程序-设备信息")
@CrossOrigin
public class ApiAppletStationController {

    @Resource
    private ApiAppletStationService apiAppletStationService;

    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", name = "token", value = "token", dataType = "String")
    })
    @ApiOperation(value = "7.1 获取设备列表",notes = "获取设备列表")
    @PostMapping("/list")
    public ResponseResult<AppletStationListDto> list(@RequestBody AppletStationListParam param){
        return apiAppletStationService.list(param);
    }

    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", name = "token", value = "token", dataType = "String")
    })
    @ApiOperation(value = "7.2 单个台站信息详情",notes = "单个台站信息详情")
    @PostMapping("/view")
    public ResponseResult<AppletStationViewDto> view(@RequestBody AppletStationViewParam param){
        return apiAppletStationService.view(param);
    }
}
